<template>
  <div>
    <div class="layout-breadcrumb">
      <span class="button-text breadcrumb-item" @click="toList">全部项目</span>
      <span class="breadcrumb-separator">></span>
      <span class="breadcrumb-item">新增项目</span>
    </div>
    <div class="project-d-container">
      <el-form label-width="100px" label-position="left" size="small">
        <el-form-item label="项目名称">
          <el-input style="width:320px" v-model="data.name"></el-input>
        </el-form-item>
        <el-form-item label="项目搜索条件">
          <m-moduleSearchCriter :data.sync="data.searchCriteriaList"></m-moduleSearchCriter>
        </el-form-item>
        <el-form-item label="项目关联岗位">
          <m-moduleRelation :data.sync="data.relationList"></m-moduleRelation>
        </el-form-item>
        <el-form-item label="项目协作情况">
          <m-moduleCooperation :data.sync="data.cooperation"></m-moduleCooperation>
        </el-form-item>
      </el-form>
      <div class="submit-box">
        <ui-button size="medium" @click="close">关闭</ui-button>
        <ui-button size="medium" type="blue">保存</ui-button>
      </div>
    </div>
    
  </div>
</template>

<script>
import {Form, FormItem, Input} from 'element-ui'
import ModuleSearchCriter from '../projectDetail/searchItem'
import ModuleRelation from '../projectDetail/relationItem'
import ModuleCooperation from '../projectDetail/cooperation'
  export default {
    components: {
      [Form.name]: Form,
      [FormItem.name]: FormItem,
      [Input.name]: Input,
      'm-moduleSearchCriter': ModuleSearchCriter,
      'm-moduleRelation': ModuleRelation,
      'm-moduleCooperation': ModuleCooperation,
    },
    data () {
      return {
        data: {
          name: '',
          searchCriteriaList: [],
          relationList: [],
          cooperation: {
            memberNum: 0,
            contactNum: 0,
            recommendNum: 0,
            offerNum: 0,
          },
        }
      }
    },
    methods: {
      toList() {
        this.$emit('toList', true)
      },
      close() {
        this.$emit('close', true)
      }
    },
  }
</script>

<style>

 
</style>
